
      <div class="form-group">
        <label class="col-lg-3 control-label" >ยี่ห้อ</label>
          <div class="col-lg-4 col-md-4 col-sm-4 col-xs-6" id="brand_block">
            <select class="form-control" name="meta[brand]" id="brand">
              <option value="0" selected>โปรดเลือก</option>
              <option value="100">A</option>
              <?php foreach ($brands as $brand) { ?>
              <option value="<?php echo $brand['id']; ?>" <?php if(!empty($postmeta) AND $postmeta["brand"] == $brand['id']){ echo "selected"; } ?> >
                <?php echo $brand['name']; ?>
              </option>
              <?php  } ?>
            </select>
         </div>
      </div>

      <div class="form-group">
        <label class="col-lg-3 control-label" >รุ่น</label>
          <div class="col-lg-4 col-md-4 col-sm-4 col-xs-6" id="model_block">
            <select class="form-control" name="meta[model]" id="model">
              <?php if(!empty($models)):?>
              <option value="0" selected>โปรดเลือก</option>
              <option value="100">A</option>
                <?php  foreach ($models as $model) { ?>
                  <option value="<?php echo $model['id']; ?>" <?php if($postmeta["model"] == $model['id']){ echo "selected"; } ?> >
                    <?php echo $model['name']; ?>
                  </option>
                <?php  } ?>
              <?php else: ?>
                <option value="0" selected>โปรดเลือกยี่ห้อ</option>
              <?php endif; ?>
            </select>
         </div>
      </div>
      